﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;

namespace SMS.Common.Search
{
    /// <summary>
    /// 搜索结果
    /// </summary>
    /// <typeparam name="T">搜索的实体类型</typeparam>
    [DataContract(Name = "SearchResultOf{0}")]
    public class SearchResult<T>
    {
        /// <summary>
        /// 匹配搜索条件的所有记录数
        /// </summary>
        [DataMember]
        public int TotalCount { get; set; }
        /// <summary>
        /// 当前页结果集
        /// </summary>
        [DataMember]
        public T[] ResultSet{ get; set; }
        /// <summary>
        /// 执行搜索时出现的错误信息
        /// </summary>
        [DataMember]
        public string Error{ get; set; }
    }
}
